This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
~Gus Zenboosizen 8.Jan.04 05:03 PM a Web browser Applications Development 6.0.3 All Platforms
I have an agent that if a field value on a form is left blank, it replaces the value.
The agent works correctly when listed as an action menu selection and is run on a selected document in a view. When changed to an agent list selection and run during the save event the field values do not change on the document. I am able to view the code via the debugger while running and the field value does change while walking through the code, but when the debugger finishes and the document is closed, the original value is on the form again . The code below is part of the agent. The owner field is a field on the initial form that if left blank when saved, it does get changed to Lynne when viewing the doc - items values, but is blank after being saved. The ownernotified field does not exist in the form and is only populated when the agent is run, it has the correct value - Lynne when closed.
I'm signed in and using a design id that has manager access to the database. The designer also has full access to run agents on the server and all development work is done with this id..
If (doc.owner(0)="") Or doc.owner(0)="Unassigned" Then
Call doc.ReplaceItemValue("Owner", "Lynne")
Call doc.Save(True, False)
End If
If doc.OwnerNotified(0) <> doc.Owner(0) Then
Call doc.ReplaceItemValue("OwnerNotified", doc.Owner(0))
Call doc.Save(True, False)
End If
Appreciate any light that can be shed - thanks so much, Penny